<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>事件基础</title>
	</head>
	<body>
		<!--<input type="button" name="btn" id="btn" value="点我" />-->
		<button id="btn">点我</button>
		<script type="text/javascript">
			var btnEle = document.querySelector('#btn');
			console.dir(btnEle);
			btnEle.onclick = function() {
				
				alert('hello');
			}
		</script>
	</body>
</html>
